const TokenKey = 'accessToken'
const RefreshTokenKey = 'refreshToken'

export function getToken() {
    return localStorage.getItem(TokenKey) || ''
}
export function getRefreshToken() {
    return localStorage.getItem(RefreshTokenKey) || ''
}
export function setToken(token, refreshToken) {
    localStorage.setItem(TokenKey, token)
    localStorage.setItem(RefreshTokenKey, refreshToken)
}
export function clearToken() {
    localStorage.removeItem(TokenKey)
    localStorage.removeItem(RefreshTokenKey)
}
export function isLogin() {
    let token = getToken()
    if (token) {
        return true
    } else {
        return false
    }
}